
const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path')

app.whenReady().then(()=>{
    createCircleWindow()
})
let win;
function createCircleWindow() {
    win = new BrowserWindow({
      width: 600,
      height: 500,
      titleBarStyle: 'hiddenInset', // 隐藏标题栏
      resizable: false,
    //   frame:false,  // 设置无边框窗口
      transparent: true, // 设置透明窗口
      webPreferences: {
        preload: path.join(__dirname, '../preload/index.js'),
      },
    })
     win.loadFile(path.join(__dirname, '../renderer/clock.html'))
    // win.setIgnoreMouseEvents(true)
    // ipcMain.on('set-ignore-mouse-events', (event, ...args) => {
    //   BrowserWindow.fromWebContents(event.sender).setIgnoreMouseEvents(...args)
    // })
  }